define(['./../initial', './../model/Project', './../model/PublicMap', './projects', './notice', './login', './user', './admin', './statistic', './report'], function () {
    var app = angular.module('App.home');
    app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
        function ($stateProvider, $urlRouterProvider, $locationProvider) {

            $locationProvider.html5Mode(true);
            //首次载入,导航到我的项目
            $urlRouterProvider.when('/', '/projects');
            //不合法的url,全部导航到'/'
            $urlRouterProvider.otherwise("/");
        }
    ]);
    app.run(['$state', '$rootScope', function ($state, $rootScope) {
        //注入$state到$rootScope中
        $rootScope.$state = $state;
    }]);
});
